<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>数据查看</title>
    <script type="text/javascript" src="../js/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="../js/page.js"></script>
    <link rel='stylesheet' type='text/css' media='screen' href='../css/page.css'> 
    <script>
        window.onload=function(){
            var table=document.getElementById("stutable");
            for(var i=0;i<table.rows.length;i++){
                table.rows[i].cells[0].innerHTML=(i+1);
            }
        }
    </script>
</head>
<body>
    <?php
        include_once 'DBLink.php';
        session_start();
        if($_SESSION['username']==null||$_SESSION['password']==null){
            header("refresh:0;url=../index.html");
        }
    ?>     
    <div class="bg bg-blur"></div>
    <div class="content">
        <?php include_once 'adminNavbar.php' ?>
        <div class="stuList">
            <div class="cur-position">
                首页<span class="seperate-lean">/</span>数据查看<span class="seperate-lean">/</span>
                <span style="color:#000;">搜索页</span>
            </div>
            <form class="search" action="userAction.php?method=search" method="post">
                <input type="text" name="stuNo" placeholder="请输入序列号">
                <button class="button_search" type="submit">
                    <i><img src="../images/search.png"></img></i><span>搜  索</span>
                </button>
            </form>
            <table class="stutable">
                <thead>
		    <tr>
                        <th>序号</th><th>序列号</th>
                        <th>时间</th><th>温度</th>
                        <th>烟雾</th><th>操作</th>
                    </tr>
                </thead>
                <tbody id="stutable">
                    <tr>
                        <td></td>
			<td><?php echo $_SESSION['time'];?></td>
                        <td><?php echo $date=date('Y-m-t h:m:s',$row['time']); ?> </td>
                        <td><?php echo $_SESSION['temperature'];?></td>
                        <td><?php echo $_SESSION['smoke'];?></td>
                        <td>
                            <a href="userAction.php?method=delete&stuNo=<?php echo $_SESSION['stuNo']; ?>">
                                <button class="button_delete" >
                                    <i><img src="../images/delete.png"></img></i><span>删除</span>
                                </button>                               
                            </a>
                        </td>
                    </tr>
                </tbody>
            </table>
            <input type="button" value="返 回" class="button_back" onclick="javascript:window.location.href='data_list.php';">
        </div>
    </div>
</body>
</html>
